<?php

namespace cccmvc;

// TODO Refresh session when user active.
class Session
{
    public function __construct()
    {
        session_start();
    }

    public function get(string $key)
    {
        return $_SESSION[$key] ?? false;
    }

    public function set(string $key, $data): void
    {
        $_SESSION[$key] = $data;
    }

    public function remove($key): void
    {
        unset($_SESSION[$key]);
    }
}